package com.why.cannal;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import javax.annotation.Resource;

/**
 * @program: guli_parent
 * @description:
 * @author: @why
 * @create: 2021-02-25 16:48
 **/
@SpringBootApplication
public class clientApplication implements CommandLineRunner {
//    我们自己的类
@Resource
private CanalClient canalClient;

    public static void main(String[] args) {
        SpringApplication.run(clientApplication.class,args);
    }


    @Override
    public void run(String... args) throws Exception {
        //项目启动，执行canal客户端监听
        canalClient.run();
    }
}
